<template>
	<view class="box">
		<!-- 选择会员 -->
		<view class="selectMember">
			<view class="member"  @click="id ? dialog = false : dialog = true">
				<image src="../../../static/img/quickly/information/add@2x.png"></image>
				<text>{{userName || '选择会员'}}</text>
			</view>
			<view class="save" @click="showModalBtn(1)">保存</view>
			<view class="toSend" @click="showModalBtn(2)">签名发送</view>
		</view>
			
		<view class="mainContent">
			<!-- 双向转诊单存根 -->
			<view class="referralOne">
				<view class="title">双向转诊单存根</view>
				<view class="information">
					<view class="name">
						<view class="left">患者姓名：</view>
						<view class="right bold">{{memberInformation.realName}}</view>
					</view>
					<view class="name">
						<view class="left">性别：</view>
						<view class="right bold">{{memberInformation.sex == 1 ? '男' : memberInformation.sex == 2 ? '女' : memberInformation.sex == 3 ? '未知' : ''}}</view>
					</view>
					<view class="name">
						<view class="left">年龄：</view>
						<view class="right bold">{{memberInformation.age ? memberInformation.age +'岁' : ''}}</view>
					</view>
					<view class="name">
						<view class="left">档案编号：</view>
						<input type="text" class="right" placeholder="请输入档案编号" v-model="userSn">
					</view>
					<view class="name">
						<view class="left">联系电话：</view>
						<input type="text" class="right" placeholder="请输入联系电话" v-model="phone">
					</view>
					<view class="name">
						<view class="left">家庭住址：</view>
						<input type="text" class="right" placeholder="请输入家庭住址" v-model="add">
					</view>
					<view class="name">
						<view class="left">于：</view>
						<picker mode="date" :start="start" :end="end"  @change="bindDateChange" class="right">
							<view class="date" v-if="!transferDate">请选择年月日</view>
							<view v-else>{{transferDate}}</view>
						</picker> 
					</view>
					<view class="name">
						<view class="left"></view>
						<input type="text" class="right" placeholder="请输入科室" v-model="department">
					</view>
					<view class="name">
						<view class="left"></view>
						<input type="text" class="right" placeholder="请输入接诊医生" v-model="attendingDoctor">
					</view>
				</view>	
			</view>
			
			<!-- 双向转诊（转出）单 -->
			<view class="referralOne">
				<view class="title">双向转诊（转出）单</view>
				<view class="information">
					<view class="name">
						<view class="left">机构名称：   </view>
						<input type="text" class="right" placeholder="请输入机构名称" v-model="organizationName">
					</view>
					<view class="name">
						<view class="left">现有患者：</view>
						<view class="right bold">{{memberInformation.realName}}</view>
					</view>
					<view class="name">
						<view class="left">性别：</view>
						<view class="right bold">{{memberInformation.sex == 1 ? '男' : memberInformation.sex == 2 ? '女' : memberInformation.sex == 3 ? '未知' : ''}}</view>
					</view>
					<view class="reason">因病情需要，需转入贵单位，请予以接诊。</view>
				</view>	
			</view>
			
			<!-- 初步印象 -->
			<view class="referralOne">
				<view class="title">初步印象：</view>
				<view  class="impression">
					<editor id="initialImpression" class="commentInput ql-container2" placeholder="请输入初步印象" v-model="initialImpression"></editor>
				</view>
			</view>
			
			<!-- 主要现病史（转出原因） -->
			<view class="referralOne">
				<view class="title">主要现病史（转出原因）：</view>
				<view  class="impression">
					<editor id="medicalHistory" class="commentInput ql-container2" placeholder="请输入主要现病史" v-model="medicalHistory"></editor>
				</view>
			</view>
			
			<!-- 主要既往史 -->
			<view class="referralOne">
				<view class="title">主要既往史：</view>
				<view  class="impression">
					<editor id="majorPastHistory" class="commentInput ql-container2" placeholder="请输入主要既往史" v-model="majorPastHistory"></editor>
				</view>
			</view>
			
			<!-- 主要既往史 -->
			<view class="referralOne">
				<view class="title">治疗经过：</view>
				<view  class="impression">
					<editor id="courseOfTreatment" class="commentInput ql-container2" placeholder="治疗经过" v-model="courseOfTreatment"></editor>
				</view>
			</view>

			
			<view class="referralOne">
				<view class="information">
					<view class="name">
						<view class="left">转诊医生：</view>
						<input type="text" class="right" v-model="referralDoctor">
					</view>
					<view class="name">
						<view class="left">医生电话：</view>
						<input type="text" class="right" v-model="doctorPhone">
					</view>
					<view class="name">
						<view class="left">转诊机构：</view>
						<input type="text" class="right" placeholder="机构名称" v-model="referralInstitution">
					</view>
					<view class="name">
						<view class="left">转诊日期：</view>
						<picker mode="date" :start="start"  @change="bindDateChange2" class="right">
							<view class="date" v-if="!referralDate">请选择年月日</view>
							<view v-else>{{referralDate}}</view>
						</picker> 
					</view>
				</view>	
			</view>
			
		</view>
		
		<!-- 会员弹框 -->
		<member :dialog.sync="dialog"  @hidedialog="hidedialog" @chooseUser="chooseUser"></member>
		<u-modal v-model="showModal" :content="showContent" :show-cancel-button="true" @confirm="sureconfirm" @cancel="cancel"></u-modal>
		
	</view>
</template>

<script src="@/static/js/quickly/referral/outOrder"></script>

<style lang="scss" scoped>
	@import  '@/static/css/quickly/referral/outOrder.scss';
</style>
